from django.db import models
from django.utils import timezone

# Create your models here.

class DiagnosisTemplate(models.Model):
    """诊断模板"""
    name = models.CharField(max_length=100, verbose_name='模板名称')
    description = models.TextField(verbose_name='诊断描述')
    created_at = models.DateTimeField(default=timezone.now, verbose_name='创建时间')
    updated_at = models.DateTimeField(auto_now=True, verbose_name='更新时间')
    is_active = models.BooleanField(default=True, verbose_name='是否启用')

    class Meta:
        verbose_name = '诊断模板'
        verbose_name_plural = verbose_name
        ordering = ['-created_at']

    def __str__(self):
        return self.name
